25 void BeginRun(
int transition,
int run,
int time){
26 std::cout <<
"Custom: begin run " << run << std::endl;
29 void EndRun(
int transition,
int run,
int time){
30 std::cout <<
"Custom end run " << run <<std::endl;
42 std::cout <<
"Trying to handle this event... " << size <<
" " <<
nnn << std::endl;
47 sprintf(sname,
"size%d", 0);
50 printf(
"Create [%s]\n", sname);
51 hsize =
new TH1D(sname, sname, 600, 0, 6000);
60 std::cout <<
"TDC measurements for V1190" << std::endl;
62 for(
unsigned int i = 0; i < measurements.size(); i++){
65 std::cout <<
"Measurement: " << tdcmeas.
GetMeasurement() <<
" for tdc/chan " <<
85 std::cout <<
"\t-D option: this is a fun new option " << std::endl;
90 const char* arg = option.c_str();
91 if (strncmp(arg,
"-D",2)==0){
92 std::cout << arg+2 << std::endl;
93 std::cout <<
"I'm happy with this flag!" << std::endl;
107 int main(
int argc,
char *argv[])
110 MyTestLoop::CreateSingleton<MyTestLoop>();
int main(int argc, char *argv[])
bool ProcessMidasEvent(TDataContainer &dataContainer)
Process each midas event.
void EndRun(int transition, int run, int time)
void BeginRun(int transition, int run, int time)
bool CheckOption(std::string option)
uint32_t GetMeasurement() const
Get the TDC measurement.
uint32_t GetTDCNumber() const
Get the TDC number.
uint32_t GetChannel() const
Get the channel number.
T * GetEventData(const char *name)
Add a templated function that returns event data in the format that we want.
TMidasEvent & GetMidasData() const
Get the MIDAS data for this event, in TMidasEvent format.
virtual Bool_t cd(const char *path=0)
virtual TObject * Get(const char *namecycle)
int LocateBank(const void *unused, const char *bankName, void **bankPtr) const
static TRootanaEventLoop & Get(void)
int GetCurrentRunNumber() const
Current Run Number.
int ExecuteLoop(int argc, char *argv[])
Method to actually process the Midas information, either as file or online.
TDirectory * fOnlineHistDir
TDirectory for online histograms.
std::vector< TDCMeasurement > & GetMeasurements()
Get the Vector of TDC Measurements.
Class for storing data from CAEN V792 module.
void Print()
Print the bank contents in a structured way.