+ /* retrieve config file */
+ int getConfigFile = daqDA_DB_getFile("TOFPhysicsConfig.xml","TOFPhysicsConfig.xml");
+ if (getConfigFile != 0){
+ printf("Failed to retrieve config file from DB! returning...\n");
+ return -1;
+ }
+
+ AliTOFDaConfigHandler* tofHandler = new AliTOFDaConfigHandler();
+ TSAXParser *parser = new TSAXParser();
+ parser->ConnectToHandler("AliTOFDaConfigHandler", tofHandler);
+ if (parser->ParseFile("./TOFPhysicsConfig.xml") != 0) {
+ printf("Failed parsing config file! retunring... \n");
+ return -1;
+ }
+
+ Int_t debugFlag = tofHandler->GetDebugFlag();
+ printf("The debug flag is %i\n",debugFlag);
+ Int_t t0Flag = tofHandler->GetT0Flag();
+ printf("The T0 flag is %i\n\n",t0Flag);
+ if (t0Flag) {
+ printf("The T0 time will be subtracted from the measured TOF time. So, in TDC bins: \n");
+ printf("tof = tofRaw - (rawReaderT0->GetData(51,0)+rawReaderT0->GetData(52,0))/2) \n\n");
+ }
+ else {
+ printf("The T0 time will not be used.\n");
+ printf("tof = tofRaw \n\n");
+ }
+
+ /* init some counters */
+ int nevents_physics=0;
+ int nevents_total=0;
+
+ Int_t iev=0;
+
+ Int_t nPDBEntriesToT = 0;
+ Int_t nDBEntriesToT = 0;
+ AliTOFHitData *HitData;
+ Int_t dummy = -1;
+ Int_t Volume[5];
+ for (Int_t i=0;i<5;i++) Volume[i]=-1;
+ AliTOFRawStream *rawStreamTOF = new AliTOFRawStream();
+ AliTOFHitDataBuffer *DataBuffer;
+ AliTOFHitDataBuffer *PackedDataBuffer;
+ Int_t nDBEntries = 0;
+ Int_t nPDBEntries = 0;
+
+ struct eventHeaderStruct *event;
+ eventTypeType eventT;
+