void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root") { // // This macro fill the container MHMcEnergies using the task // MMcThresholdCalc and shows the results. // MParList parlist; MTaskList tasklist; parlist.AddToList(&tasklist); // // Setup the parameter list // - You need create the container MHMcEnergies. // + You need to put the number of trigger conditions when // you declarete the MHMcEnergies // + If you don't put any dimension to MHMcEnergies it works // taking only the trigger information from MMcTrig // const UInt_t numtriggerconditions = 4; // // Create numtriggerconditions histograms of type MHMcEnergy // and store the histograms in an TObjArray // TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions)); // // Check if the list really contains the right number of histograms // if (hists->GetEntriesFast() != numtriggerconditions) return; // // Add the histograms to the paramater list. // parlist.AddToList(hists); // // Setup the task list // - You need the read and the MMcThresholdCalc tasks // - You have to fill the histograms for the Energy threshold // + You need to put the number of trigger conditions when // you declarete the MMcThresholdCalc // + If you don't put any dimension to MMcThresholdCalc it works // like one dimension MMcThresholdCalc // MReadTree read("Events;7", filename); MMcThresholdCalc calc(numtriggerconditions); tasklist.AddToList(&read); tasklist.AddToList(&calc); MEvtLoop evtloop; evtloop.SetParList(&parlist); // // Begin the loop (if the loop wasn't succesfull // don't try to draw the results // if (!evtloop.Eventloop()) return; // // Now you can display the results // for (UInt_t i=0; iDraw(); }