SusyNtuple
|
00001 #ifndef SusyCommon_TriggerTools_h 00002 #define SusyCommon_TriggerTools_h 00003 00004 #include <iostream> 00005 #include <vector> 00006 #include <map> 00007 #include "TBits.h" 00008 00009 class TH1; 00010 00012 // Function to grab the trigger "container" // 00013 // Used only at stage of writing the SusyNt // 00015 std::vector<std::string> getTrigNames(std::string set); 00016 00017 00019 // TriggerTools // 00020 // To be used at the analyis level of SusyNt // 00022 class TriggerTools { 00023 public : 00024 00026 TriggerTools(bool dbg=false); 00027 virtual ~TriggerTools() 00028 { 00029 }; 00031 bool init(const std::string &filename); 00032 // Method to build the trigger map given the SusyNt object 00033 //void buildTriggerMap(TChain* susyNt, bool dbg); 00034 void buildTriggerMap(const TH1* trigHisto); 00035 00036 // Method to test whether a given trigger is passed 00037 // bool passTrigger(std::map<std::string, int> trigMap, std::string triggerName); 00038 bool passTrigger(const TBits& triggerbits, const std::string &triggerName) const; 00039 00040 // Method to dump the trigger information stored 00041 void dumpTriggerInfo() const; 00042 00043 /* /// name of the first file in the */ 00044 /* static std::string firstFilename(const TChain* chain); */ 00045 00046 // dbg level 00047 bool m_dbg; 00048 00049 private : 00050 // trigger histo 00051 std::map<std::string, int> m_triggerMap; 00052 00053 }; 00054 00055 00056 #endif