void mdcmonhld(Int_t secnum=2, Int_t modnum=1, Int_t evtnum=50, Text_t *dirname, Text_t *filename) { gROOT->Reset(); cout << " Sector Number = " <open(parFile,"in"); gHades->getRuntimeDb()->setFirstInput(inp2); //Temporal solution HMdcRawStruct *parraw = new HMdcRawStruct; gHades->getRuntimeDb()->addContainer(parraw); if (! ((HParSet*) parraw)->init()) { rtdb->closeFirstInput(); rtdb->closeOutput(); return 1; } //Temporal solution //Set the split level Int_t splitLevel=2; //split level of the output tree gHades->setSplitLevel(splitLevel); // Reading from hld file HldFileSource *source=new HldFileSource; // source->addUnpacker(new HMdcUnpacker(202, FALSE)); source->addUnpacker(new HMdcUnpacker(201, FALSE)); source->addUnpacker(new HMdcUnpacker(202, FALSE)); // source->addUnpacker(new HMdcUnpacker(513,FALSE)); gHades->setDataSource(source); source->setDirectory(dirname); source->addFile(filename); // source->setDirectory("/d/hades/mdc/pulser"); // source->addFile("puls.hld"); // Monitoring HTaskSet* tasks = new HTaskSet("MDC","MDC Monitoring"); tasks->connect(new HMdcMonitor("mdcMon","mdcMon", secnum, modnum)); tasks->connect((HTask*)NULL,"mdcMon"); gHades->getTaskSet("real")->connect(tasks); // HTaskSet* caltask = new HTaskSet("cal task set","cal task set"); // HMdcMonitor * monCal = new HMdcMonitor("monitor","monitor",Id); // caltask->connect(monCal); // caltask->connect((HTask*)NULL,"monCal"); // HTask* end=0; // Text_t monitor[20]="mdc.mon"; // gHades->getTask()->connect(new HMdcMonitor(monitor,monitor,Id)); // gHades->getTask()->connect(end,monitor); // gHades->getTaskSet("calibration")->connect(new HMdcMonitor(monitor,monitor,Id)); // gHades->getTaskSet("calibration")->connect(caltask); printf("gHades->init()\n"); if (!gHades->init()) printf("Error\n"); gHades->getRuntimeDb()->print(); //Set output file Int_t compLevel=2; //compression level of the output file //gHades->setOutputFile("test.root","RECREATE","Test",compLevel); // gHades->setOutputFile("pulscal.root","RECREATE","Test",compLevel); gHades->setOutputFile("n99_037.root","RECREATE","Test",compLevel); //Build output tree gHades->makeTree(); // Event Loop printf("Event loop\n"); gHades->eventLoop(evtnum,510); delete gHades; }