00001 #ifndef QUICK_ANA__OPTIMIZER_STORE_H
00002 #define QUICK_ANA__OPTIMIZER_STORE_H
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #include <QuickAna/Global.h>
00021 
00022 #include <string>
00023 #include <vector>
00024 
00025 namespace ana
00026 {
00027 
00033   class OptimizedStore
00034   {
00035     
00036     
00037     
00038 
00040   public:
00041     static const std::size_t noIndex = std::size_t (-1);
00042 
00043 
00044     
00045     OptimizedStore (const OptimizedStore&) = delete;
00046     OptimizedStore& operator = (const OptimizedStore&) = delete;
00047 
00048 
00052   public:
00053     void testInvariant () const;
00054 
00055 
00061   public:
00062     OptimizedStore (const std::vector<CP::SystematicSet>& val_requestedSystematics,
00063             StoreType *val_store);
00064 
00065 
00071   public:
00072     ~OptimizedStore ();
00073 
00074 
00078   public:
00079     const std::vector<CP::SystematicSet>& requestedSystematics () const;
00080 
00081 
00088   public:
00089     const CP::SystematicSet& objectSystematics (ObjectType type) const;
00090 
00091 
00102   public:
00103     StatusCode
00104     prepareCopy (ObjectType type, std::size_t index, std::size_t origIndex);
00105 
00106 
00115   public:
00116     StatusCode
00117     initializeIndices (const std::vector<OptimizedObjects*>& objects,
00118                unsigned inputTypes, unsigned outputTypes,
00119                AnalysisStep step);
00120 
00121 
00125   public:
00126     void clearData ();
00127 
00128 
00132   public:
00133     StatusCode finalInit ();
00134 
00135 
00139   public:
00140     unsigned objectTypes () const;
00141 
00142 
00149   public:
00150     void fillEventData (ObjectType type, unsigned index,
00151             const CP::SystematicSet& sys,
00152             EventData& eventData) const;
00153 
00154 
00155 
00156     
00157     
00158     
00159 
00161   public:
00162     void *getVoid (ObjectType type, std::size_t index) const;
00163 
00164 
00166   public:
00167     StatusCode
00168     addCopy (ObjectType type, std::size_t index,
00169          const std::string& name);
00170 
00171 
00173   public:
00174     StatusCode
00175     addNew (ObjectType type, std::size_t index);
00176 
00177 
00178 
00179     
00180     
00181     
00182 
00184   private:
00185     struct Pimpl;
00186 
00188   private:
00189     Pimpl *pimpl;
00190 
00192   private:
00193     struct InfoType;
00194 
00196   private:
00197     struct InfoObject;
00198   };
00199 }
00200 
00201 #endif