/* ======================================================================== *\ ! ! * ! * This file is part of MARS, the MAGIC Analysis and Reconstruction ! * Software. It is distributed to you in the hope that it can be a useful ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. ! * It is distributed WITHOUT ANY WARRANTY. ! * ! * Permission to use, copy, modify and distribute this software and its ! * documentation for any purpose is hereby granted without fee, ! * provided that the above copyright notice appear in all copies and ! * that both that copyright notice and this permission notice appear ! * in supporting documentation. It is provided "as is" without express ! * or implied warranty. ! * ! ! ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de) ! ! Copyright: MAGIC Software Development, 2000-2001 ! ! \* ======================================================================== */ void collarea(char *filename = "data/camera.root") { // FIXME: Harald, you should tell the people what the result of // this macro really is. // // first we have to create our empty lists // MParList parlist; MTaskList tasklist; // // Setup the parameter list. // - we need to create MCollArea only. The other containers // are created automatically without loss - we don't have to // access them- // - MCollArea must be created by us because we need the pointer // to it and if it would get created automatically it would also be // deleted automatically // parlist.AddToList(&tasklist); MHMcCollectionArea *collArea = new MHMcCollectionArea; parlist.AddToList(collArea); // // Setup out tasks: // - First we have to read the events // - Then we can fill the efficiency histograms // MReadTree reader("Events", filename); reader.UseLeaf("fImpact"); reader.UseLeaf("fEnergy"); reader.UseLeaf("fNumFirstLevel"); tasklist.AddToList(&reader); MMcCollectionAreaCalc effi; tasklist.AddToList(&effi); MTask task; tasklist.AddToList(&task); // // set up the loop for the processing // MEvtLoop magic; magic.SetParList(&parlist); // // Start to loop over all events // if (!magic.Eventloop()) return; tasklist.PrintStatistics(); // // Now the histogram we wanted to get out of the data is // filled and can be displayd // collArea->Draw(); }