ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
TCvec Class Reference

#include <TestClass.h>

Inheritance diagram for TCvec:
Collaboration diagram for TCvec:

Public Member Functions

 TCvec ()
 
 TCvec (const int i)
 
void Set (const int i)
 
 ~TCvec ()
 
void print () const
 
std::string getKey () const
 
bool isEqual (const TestClass *otherobj) const
 

Public Attributes

std::vector< int > my_integers
 
std::string key
 

Detailed Description

Definition at line 434 of file TestClass.h.

Constructor & Destructor Documentation

◆ TCvec() [1/2]

TCvec::TCvec ( )
inline

Definition at line 441 of file TestClass.h.

441 {}

◆ TCvec() [2/2]

TCvec::TCvec ( const int  i)
inline

Definition at line 442 of file TestClass.h.

442  { Set(i);
443 
444  }

◆ ~TCvec()

TCvec::~TCvec ( )
inline

Definition at line 454 of file TestClass.h.

454 {}

Member Function Documentation

◆ getKey()

std::string TCvec::getKey ( ) const
inlinevirtual

Reimplemented from TestClass.

Definition at line 468 of file TestClass.h.

468  {
469  return("TCvec");
470 
471  }

◆ isEqual()

bool TCvec::isEqual ( const TestClass otherobj) const
inlinevirtual

Implements TestClass.

Definition at line 473 of file TestClass.h.

473  {
474  TCvec *tc = (TCvec *)otherobj;
475  if(tc->my_integers.size()==my_integers.size()){
476  std::cout << "Output vectors same size" << std::endl;
477  for(int j=0; j<10; j++){
478  if(my_integers.at(j)==tc->my_integers.at(j)){
479  }
480  else{
481  return false;
482  }
483  }
484  return true;
485  }
486  else{
487  return false;
488  }
489  }

◆ print()

void TCvec::print ( ) const
inlinevirtual

Implements TestClass.

Definition at line 455 of file TestClass.h.

455  {
456  std::cout << "Output::"<< getKey() << " vector of integers: ";
457  const int maxsiz = (my_integers.size()<5 ? my_integers.size() : 5);
458  for (int i=0; i<maxsiz; i++){
459  std::cout << my_integers.at(i) << "\t";
460  }
461  std::cout << std::endl;
462 
463  }

◆ Set()

void TCvec::Set ( const int  i)
inline

Definition at line 445 of file TestClass.h.

445  {
446  for (int j=0; j<i; j++){
447  my_integers.push_back(j+i*2);
448  }
449 
450  }

Member Data Documentation

◆ key

std::string TestClass::key
inherited

Definition at line 19 of file TestClass.h.

◆ my_integers

std::vector<int> TCvec::my_integers

Definition at line 436 of file TestClass.h.


The documentation for this class was generated from the following file:
TCvec
Definition: TestClass.h:434
lumiFormat.i
int i
Definition: lumiFormat.py:92
TCvec::Set
void Set(const int i)
Definition: TestClass.h:445
TCvec::my_integers
std::vector< int > my_integers
Definition: TestClass.h:436
TCvec::getKey
std::string getKey() const
Definition: TestClass.h:468