ATLAS Offline Software
Loading...
Searching...
No Matches
CodeGenerator_v2.cxx File Reference
#include <ctime>
#include <locale>
#include <sys/stat.h>
#include <fstream>
#include <sstream>
#include <algorithm>
#include "GaudiKernel/System.h"
#include "AthenaKernel/errorcheck.h"
#include "D3PDMakerUtils/ObjectMetadata.h"
#include "CodeGenerator_v2.h"
#include "CodeGenerator_v2_constants.h"
#include "isPrimitive.h"

Go to the source code of this file.

Namespaces

namespace  D3PD
 Block filler tool for noisy FEB information.
namespace  D3PD::Version2
 Private namespace for version 2 of the code generator code.

Macros

#define FOR_ALL_EVENT_VARIABLES(EXP)
 A convenience macro used in the event class generation.

Functions

StatusCode D3PD::Version2::writeD3PDObjectBase (const std::string &dir)
 This function can be used to create the D3PDReader::D3PDObjectBase class's source files.
StatusCode D3PD::Version2::writeVarHandle (const std::string &dir)
 This function can be used to create the D3PDReader::VarHandle class's source files.
StatusCode D3PD::Version2::writeVarProxy (const std::string &dir)
 This function can be used to create the D3PDReader::VarProxy class's source files.
StatusCode D3PD::Version2::writeUserD3PDObject (const std::string &dir)
 This function can be used to create the D3PDReader::UserD3PDObject class's source files.
StatusCode D3PD::Version2::writeD3PDReadStats (const std::string &dir)
 This function can be used to create the D3PDReader::D3PDReadStats class's source files.
StatusCode D3PD::Version2::writeD3PDPerfStats (const std::string &dir)
 This function can be used to create the D3PDReader::D3PDPerfStats class's source files.
StatusCode D3PD::Version2::writeUtils (const std::string &dir)
 This function can be used to create source files containing some utility functions.
StatusCode D3PD::Version2::writeHeader (const std::string &classname, const std::string &dir, const ObjectMetadata &metadata)
 This function is used to create the header of the class describing a set of D3PD variables.
StatusCode D3PD::Version2::writeSource (const std::string &classname, const std::string &dir, const ObjectMetadata &metadata)
 This function is used to generate the source file of a D3PDReader class.
StatusCode D3PD::Version2::writeEventHeader (const std::string &classname, const std::string &dir, const std::set< ObjectMetadata > &metadata)
 Write the header of the main event class describing a D3PD tree.
StatusCode D3PD::Version2::writeEventSource (const std::string &classname, const std::string &dir, const std::set< ObjectMetadata > &metadata)
 Write the source of the main event class describing a D3PD tree.

Variables

static const char *const CODE_COMMENT
 A little header for all the generated source files.

Macro Definition Documentation

◆ FOR_ALL_EVENT_VARIABLES

#define FOR_ALL_EVENT_VARIABLES ( EXP)
Value:
{ \
std::set< ObjectMetadata >::const_iterator meta_itr = \
metadata.begin(); \
std::set< ObjectMetadata >::const_iterator meta_end = \
metadata.end(); \
std::set< std::string > varnames; \
for( ; meta_itr != meta_end; ++meta_itr ) { \
const std::string varname = \
eventVariableName( meta_itr->prefix(), \
meta_itr->name(), \
varnames ); \
varnames.insert( varname ); \
EXP; \
} \
} while( 0 )

A convenience macro used in the event class generation.

Definition at line 39 of file CodeGenerator_v2.cxx.

39#define FOR_ALL_EVENT_VARIABLES(EXP) { \
40 std::set< ObjectMetadata >::const_iterator meta_itr = \
41 metadata.begin(); \
42 std::set< ObjectMetadata >::const_iterator meta_end = \
43 metadata.end(); \
44 std::set< std::string > varnames; \
45 for( ; meta_itr != meta_end; ++meta_itr ) { \
46 const std::string varname = \
47 eventVariableName( meta_itr->prefix(), \
48 meta_itr->name(), \
49 varnames ); \
50 varnames.insert( varname ); \
51 EXP; \
52 } \
53 } while( 0 )

Variable Documentation

◆ CODE_COMMENT

const char* const CODE_COMMENT
static
Initial value:
=
"// Dear emacs, this is -*- c++ -*-\n"
"// -------------------------------------------------------------\n"
"// Code produced by D3PDMakerReader\n"
"//\n"
"// author: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>\n"
"// -------------------------------------------------------------"

A little header for all the generated source files.

Definition at line 30 of file CodeGenerator_v2.cxx.