CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTestHistoManager.cc
Go to the documentation of this file.
1 // File: HcalTestHistoManager.cc
3 // Description: Histogram managing class in HcalTestAnalysis (HcalTest)
5 
8 
10 //#include "POOLCore/Token.h"
11 //#include "FileCatalog/URIParser.h"
12 //#include "FileCatalog/FCSystemTools.h"
13 //#include "FileCatalog/IFileCatalog.h"
14 //#include "StorageSvc/DbType.h"
15 //#include "PersistencySvc/DatabaseConnectionPolicy.h"
16 //#include "PersistencySvc/ISession.h"
17 //#include "PersistencySvc/ITransaction.h"
18 //#include "PersistencySvc/IDatabase.h"
19 //#include "PersistencySvc/Placement.h"
20 //#include "DataSvc/DataSvcFactory.h"
21 //#include "DataSvc/IDataSvc.h"
22 //#include "DataSvc/ICacheSvc.h"
23 
24 #include <iostream>
25 #include <cmath>
26 
28 // svc(pool::DataSvcFactory::instance(&lcat)),
29 // placeH(file, pool::DatabaseSpecification::PFN, "HcalTestAnalysis",
30 // ROOT::Reflex::Type(), pool::ROOTTREE_StorageType.type()), h(*svc) {
31  {
32  // pool::URIParser p("file:HcalTestHistoCatalog.cat");
33  //p.parse();
34 
35  //lcat.setWriteCatalog(p.contactstring());
36 
37  //lcat.connect();
38  // lcat.start();
39 
40  // Define the policy for the implicit file handling
41  //pool::DatabaseConnectionPolicy policy;
42  //policy.setWriteModeForNonExisting(pool::DatabaseConnectionPolicy::CREATE);
43  //policy.setWriteModeForExisting(pool::DatabaseConnectionPolicy::OVERWRITE);
45  //svc->session().setDefaultConnectionPolicy(policy);
46 
47  edm::LogInfo("HcalSim") << "HcalTestHistoManager:===>>> Book user"
48  << " Histograms and Root tree";
49 }
50 
52 
53  edm::LogInfo("HcalSim") << "============================================="
54  << "==============\n"
55  << "=== HcalTestHistoManager: Start writing user "
56  << "histograms ===";
57 
58  //svc->transaction().commit();
59  //svc->session().disconnectAll();
60  //edm::LogInfo("HcalSim") << "=== HcalTestHistoManager: cache size at end "
61  // << svc->cacheSvc().cacheSize();
62  //lcat.commit();
63 
64  edm::LogInfo("HcalSim") << "=== HcalTestHistoManager: End writing user "
65  << "histograms ===\n"
66  << "============================================="
67  << "==============";
68 }
69 
71 
72  //svc->transaction().start(pool::ITransaction::UPDATE);
73  LogDebug("HcalSim") << "HcalTestHistoManager: tree pointer = " << histos;
74  //LogDebug("HcalSim") << "HcalTestHistoManager: cache size before assign "
75  // << svc->cacheSvc().cacheSize();
76 
77  //h = histos;
78  //h.markWrite(placeH);
79  //svc->transaction().commitAndHold();
80 }
#define LogDebug(id)
list file
Definition: dbtoweb.py:253
HcalTestHistoManager(const std::string &)
dictionary histos
Definition: combine.py:3
void fillTree(HcalTestHistoClass *histos)