00001 00012 #ifndef __JBLARRAYINITIALIZER_H 00013 #define __JBLARRAYINITIALIZER_H 00014 00015 #include "jbltools/sfh/h1/H1Funs.h" 00016 00017 // Prints a message 00018 void JBLArrayInitializer_message (const char *branchname); 00019 00020 template<class H1SomeArrayPtr, class ArrayRow = H1Part> 00021 struct JBLArrayInitializer { 00022 JBLArrayInitializer(const char *branchname) { 00023 if (mods_NumSomething_helper == 0) { 00024 mods_NumSomething_helper = new JBLH1ClonesArrayEntries(branchname); 00025 mods_Something_helper = new JBLH1SomeArrayIterator<H1SomeArrayPtr, ArrayRow>; 00026 JBLArrayInitializer_message (branchname); 00027 } 00028 } 00029 00030 static JBLH1ClonesArrayEntries *mods_NumSomething_helper; 00031 static JBLH1SomeArrayIterator<H1SomeArrayPtr, ArrayRow> *mods_Something_helper; 00032 }; 00033 00034 #endif /* #ifndef __JBLARRAYINITIALIZER_H */