//************************************************************************** //* This file is property of and copyright by the ALICE HLT Project * //* ALICE Experiment at CERN, All rights reserved. * //* * //* Primary Authors: Kalliopi Kanaki * //* for The ALICE HLT Project. * //* * //* Permission to use, copy, modify and distribute this software and its * //* documentation strictly for non-commercial purposes is hereby granted * //* without fee, provided that the above copyright notice appears in all * //* copies and that both the copyright notice and this permission notice * //* appear in the supporting documentation. The authors make no claims * //* about the suitability of this software for any purpose. It is * //* provided "as is" without express or implied warranty. * //************************************************************************** /** @file AliHLTEveHistoMerger.cxx @author Kalliopi Kanaki @date @brief The Histogram Handler component */ #if __GNUC__>= 3 using namespace std; #endif #include "AliHLTEveHistoMerger.h" #include "AliCDBEntry.h" #include "AliCDBManager.h" #include "TString.h" #include "TObjArray.h" #include "TObjString.h" #include "TH1.h" #include "TTimeStamp.h" #include "TSystem.h" #include AliHLTEveHistoMerger::AliHLTEveHistoMerger() : fStore() { } AliHLTEveHistoMerger::~AliHLTEveHistoMerger() { // see header file for class documentation Clear(); } void AliHLTEveHistoMerger::Clear() { // reset the store for ( unsigned int i=0; iInheritsFrom(TH1::Class()) && !evtData->InheritsFrom(TSeqCollection::Class()) ) return 0; std::cout<<"received object "<GetName()<<" with id="<< spec << std::endl; //search for the base entry, if not exist then create a new entry int iColl = -1; for ( unsigned int i=0; iGetName()).CompareTo(evtData->GetName())==0) { iColl = i; break; } } cout<<"Collection found: "<Clone(); cout<<"index = "<Clone(); TList l; for ( unsigned int i=1; iInheritsFrom(TH1::Class()) ) { TH1 *histo = dynamic_cast(c.fMergedObject); if ( histo ) histo->Merge(&l); } else if ( c.fMergedObject->InheritsFrom(TSeqCollection::Class()) ) { TSeqCollection *list = dynamic_cast(c.fMergedObject); if ( list ) list->Merge(&l); } c.fNeedToMerge = 0; } return fStore[iColl].fMergedObject; }