ATLAS Offline Software
Loading...
Searching...
No Matches
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
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 {
38 msg() << "Loading CaloJetInput " << cjiTarget.id() << std::endl;
39
40 //do something here
41
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
virtual bool load(CaloJetInput &data) override
void commitSession()
commit session if not already done
Definition DBLoader.cxx:45
coral::ISessionProxy & m_session
CORAL interface to database session.
Definition DBLoader.h:68
void startSession()
start session if not already active
Definition DBLoader.cxx:35
unsigned int id() const
MsgStreamTC & msg() const
The standard message stream.