ATLAS Offline Software
CaloJetInputLoader.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 //
7 //NAME: CaloJetInputLoader.cpp
8 //PACKAGE: TrigConfStorage
9 //
10 //AUTHOR: J.Haller (CERN) Johannes.Haller@cern.ch
11 //CREATED: 31. Oct. 2005
12 //
13 //PURPOSE:
14 //
15 //
17 
18 #include "./CaloJetInputLoader.h"
19 
20 #include <CoralBase/AttributeList.h>
21 
22 #include "RelationalAccess/SchemaException.h"
23 #include "RelationalAccess/ITransaction.h"
24 #include "RelationalAccess/ITable.h"
25 #include "RelationalAccess/ISchema.h"
26 #include "RelationalAccess/ICursor.h"
27 #include "RelationalAccess/IQuery.h"
28 
29 #include <iostream>
30 #include <stdexcept>
31 #include <typeinfo>
32 
34  msg() << "Loading CaloJetInput via ID. ID = " << cjiTarget.id() << std::endl;
35 
36  try {
37  startSession();
38  msg() << "Loading CaloJetInput " << cjiTarget.id() << std::endl;
39 
40  //do something here
41 
42  commitSession();
43  return true;
44 
45  } catch( const coral::SchemaException& e ) {
46  msg() << "CaloJetInputLoader >> SchemaException: "
47  << e.what() << std::endl;
48  m_session.transaction().rollback();
49  return false;
50  } catch( const std::exception& e ) {
51  msg() << "CaloJetInputLoader >> Standard C++ exception: " << e.what() << std::endl;
52  m_session.transaction().rollback();
53  return false;
54  } catch(...) {
55  msg() << "CaloJetInputLoader >> unknown C++ exception" << std::endl;
56  m_session.transaction().rollback();
57  return false;
58  }
59 }
60 
61 
62 
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrigConf::CaloJetInputLoader::load
virtual bool load(CaloJetInput &data) override
Definition: CaloJetInputLoader.cxx:33
TrigConf::DBLoader::m_session
coral::ISessionProxy & m_session
CORAL interface to database session.
Definition: DBLoader.h:68
CaloJetInputLoader.h
TrigConf::TrigConfMessaging::msg
MsgStreamTC & msg() const
The standard message stream.
Definition: TrigConfMessaging.h:81
calibdata.exception
exception
Definition: calibdata.py:496
TrigConf::CaloJetInput
Definition: CaloJetInput.h:14
TrigConf::TrigConfData::id
unsigned int id() const
Definition: TrigConfData.h:21
TrigConf::DBLoader::commitSession
void commitSession()
commit session if not already done
Definition: DBLoader.cxx:45
TrigConf::DBLoader::startSession
void startSession()
start session if not already active
Definition: DBLoader.cxx:35